package com.yonyou.lexue.lexuemgr.repository;

import java.util.List;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.data.repository.query.Param;

import com.yonyou.lexue.lexuemgr.entity.TrainingPlan;

public interface TrainingPlanDao extends PagingAndSortingRepository<TrainingPlan, Long> {
	
	@Query(value="select t.* from lexue_trainingplan t where t.course_id=:courseId limit :pageNumber,:pageSize order by c.createDate desc",nativeQuery=true)
	List<TrainingPlan> findTrainingPlans(@Param("pageNumber")Integer pageNumber, @Param("pageSize")Integer pageSize,@Param("courseId")String courseId);
}
